//
//  FSNewReceiveDetailCell.m
//  Trade
//
//  Created by 刘沿 on 16/4/13.
//  Copyright © 2016年 刘沿. All rights reserved.
//

#import "FSNewReceiveDetailCell.h"

@implementation FSNewReceiveDetailCell

+(instancetype)cellWihtTableView:(UITableView*)tableView{
    NSString * cellIdentifier = @"cellIdentifier";
    FSNewReceiveDetailCell * cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"FSNewReceiveDetailCell" owner:nil options:nil] lastObject];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    
    return cell;
    
}

-(void)setIndexPath:(NSIndexPath *)indexPath{
    _indexPath = indexPath;
    if (indexPath.section == 0) {
        switch (indexPath.row) {
            case 0:
                self.titleLabel.text = @"文件编号:";
                self.desLabel.text =self.detailModel.fileNum;
                break;
            case 1:
                self.titleLabel.text = @"收文日期:";
                self.desLabel.text =self.detailModel.regDate;
                break;
            case 2:
                self.titleLabel.text = @"来文单位:";
                self.desLabel.text =self.detailModel.OrigUnit;
                break;
            case 3:
                self.titleLabel.text = @"来文编号:";
                if ([self.detailModel.number isEqualToString:@"null"]) {
                    self.desLabel.text = @"";
                }else{
                    self.desLabel.text = self.detailModel.number;
                }
                
                break;
            case 4:
                self.titleLabel.text = @"标题:";
                self.desLabel.text = self.detailModel.title;
                
                break;
            case 5:
                self.titleLabel.text = @"收文分类:";
                self.desLabel.text = self.detailModel.fileClass;
                break;
            default:
                self.titleLabel.text = @"";
                self.desLabel.text =@"";
                break;
        }
        
    }else{
        self.titleLabel.text = @"";
        self.desLabel.text =@"";
    }
    
    
}




@end
